<?php
	function conectarBD(){
		$dbname = 'trabajoABD';
		$hostname = 'localhost';
		$username = 'root';
		$password = '';
		$ret = new PDO('mysql:host='.$hostname.';dbname='.$dbname,$username,$password);
		
		$ret->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);		
		return $ret;
	}
	
	function desconectarBD($con){
		$con = null;		
	}
	
?>